<?php
require_once(SITE_ROOT."/includes/page/Page.php");
require_once(SITE_ROOT."/includes/checksession.php");
require_once(SITE_ROOT.'/includes/Wzx.php');
//todo some implates

/**
 * 用户个人空间首页类类
 * 功能：实现个人空间首页所有模块加载。
 * time：2008-10-28
 * author：王照暄
 */
class Space extends Page {
	public function getTemplate() {
        return $this->template;
    }

	private function space_showIndex(){
		global $gSmarty;
		if ($_GET['uid']!="" && $_GET['uid'] != $_SESSION['G_USERID']) {
            $userid = $_GET['uid'];
        } else {
        	check_login($gSmarty);
            $userid = $_SESSION['G_USERID'];
        }
        $app = Wzx::getElementObject(0);
		$userinfo = new UserInfoSpaceComponent($app,$userid);
		$userinfo->prepare();
		
		$gSmarty->display("member/index.dwt");
	}
	
	
	public function  prapare(){
		$act = $_GET['act'];
		if( $act != "" ){
			$this->space_showIndex();
		}else{
			$this->space_showIndex();
		}
	}
}

?>